import com.sun.xml.internal.bind.v2.runtime.unmarshaller.XsiNilLoader;

import java.util.Arrays;

public class Leet747 {
    public int dominantIndex(int[] nums) {
        Arrays.sort(nums);
        return nums[nums.length-1]>=2*nums[nums.length-2]?1:0;
    }
}
